#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    bool flag;
    if (a < b) {
        flag = (a <= c) && (c < b);
    } else {
        flag = (c >= a) || (c < b); 
    }
    puts(flag ? "Yes" : "No");
    return 0;
}